{% extends 'userinfo.html' %}

{% block member %}
<div class="is-block">
    <div class=" is-pulled-left">
        <h1 class=" is-size-4">
            <span class="icon">
                <i class="mdi mdi-receipt-outline"></i>
            </span>
            个人信息修改
        </h1>
    </div>

{% block button %} {% endblock button %}
<div class="is-clearfix"></div>
<div class=" dropdown-divider"></div>

{% block table_content %}
    <form action="" method="post" class="mt-4" enctype="multipart/form-data">
        {{ form.csrf_token }}
        <div class="field">
            {{ form.username.label(class='label') }}
            <div class="control">
                {{ form.username(class='input', placeholder='用户名') }}
            </div>
        </div>
        <div class="field">
            {{ form.password.label(class='label') }}
            <div class="control">
                {{ form.password(class='input', placeholder='密码') }}
                <p class="help has-text-grey-light">
                    {{ form.password.description }}
                </p>
            </div>
        </div>
        <div class="field">
            {{ form.avatar.label(class='label') }}
            <div class="control">
                {{ form.avatar(class='input',  placeholder='头像') }}
                <p class="help has-text-grey-light">
                    {{ form.avatar.description }}
                </p>
            </div>          
        </div>

        <div class="field">
            {{ form.gender.label(class='label') }}
            <div class="control">
                {{ form.gender(class='input', placeholder='性别') }}
            </div>
        </div>
        <div class="field">
            {{ form.email.label(class='label') }}
            <div class="control">
                {{ form.email(class='input', placeholder='邮箱') }}
            </div>
        </div>
        <div class="field">
            {{ form.sign.label(class='label') }}
            <div class="control">
                {{ form.sign(class='input', placeholder='个性签名') }}
            </div>
        </div>
        <div class="field">
            {{ form.introduce.label(class='label') }}
            <div class="control">
                {{ form.introduce(class='input', placeholder='个人介绍') }}
            </div>
        </div>
        <div class="is-block">
            <div class="box has-background-light is-shadowless level">
                <button class=" is-danger button level-left">删除</button>
                <div class="level-right">
                    <a href="{{ url_for('auth.userinfo') }}" class="button is-primary is-light mr-2">返回</a>
                    <input type="submit" value="保存" class=" button is-success">
                </div>
            </div>
        </div>
    </form>
{% endblock table_content %} 
{% endblock member %}